<?php
class RM_Insurances_Object implements RM_Extras_Object_Interface
{
    /**
     * @var RM_Insurances_Row
     */
    protected $_insuranceRow;
    protected $_value;
    protected $_price = 0;

    public function __construct(RM_Insurances_Row $insuranceRow, $price, $value)
    {
        $this->_insuranceRow = $insuranceRow;
        $this->_price = $price;
        $this->_value = $value;
    }

    public function getValue()
    {
        return $this->_value;
    }

    public function getName($iso = null)
    {
        return $this->_insuranceRow->getName($iso);
    }

    public function getPrice()
    {
        return $this->_price;
    }

    public function getID()
    {
        return $this->_insuranceRow->id;
    }    

    public function toArray($iso = null)
    {
        $array = $this->_insuranceRow->toArray($iso);
        $array['price'] = $this->getPrice();
        $array['value'] = $this->getValue();
        return $array;
    }
}
